home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Mac Game Programming Gurus
/
TricksOfTheMacGameProgrammingGurus.iso
/
More Source
/
Pascal
/
Skel 3.0i
/
Skel report.p
< prev
next >
Wrap
Text File
|
1994-04-12
|
1KB
|
32 lines
unit Report;
interface
uses
Globals;
procedure Report (reportstr: StringHandle);
implementation
{Print a string in dialog box}
{############################ Report #################################}
{We put up a dialog box, show the string, and wait for user to hit OK.}
procedure Report (reportstr: StringHandle);
{char ^^reportstr;}
const
rptboxid = 257; (* ID of our report dialog in resource file *)
rpttext = 2; (* Item # of dialog's report text *)
var
itemhit: integer; (* which Item was clicked on (only OK avail) *)
reportptr: DialogPtr;
begin
ParamText(reportstr^^, '', '', '');(* set text to display *)
reportptr := GetNewDialog(rptboxid, nil, WindowPtr(-1));
(* get from Resource file; NIL => use heap storage; -1 => make dlg frontmost *)
ModalDialog(nil, itemhit);
(* carry out dialog; NIL => no FilterProc; return Item Hit when done *)
DisposDialog(reportptr); (* release storage and remove dialog from screen *)
end; (* Report *)
end.